package com.dmcb.common.business.utils;

import java.math.BigDecimal;

/**
 * Created by long on 2015/4/24.
 */
public class BigDecimalUtil {

    /**
     * 提供精确乘法运算的mul方法
     * @param value1 被乘数
     * @param value2 乘数
     * @return 两个参数的积
     */
    public static double mul(double value1,double value2){
        BigDecimal b1 = new BigDecimal(Double.toString(value1));
        BigDecimal b2 = new BigDecimal(Double.toString(value2));
        return b1.multiply(b2).intValue();
    }

}
